﻿using HBase;
using System.Net.Sockets;
using System.Net;
using System.Management;
using System.Threading.Tasks;
using Org.BouncyCastle.Asn1.Crmf;
using Net.http;

namespace http {
    internal class Program {
        static void Main(string[] args) {
           bool c= NetConfig.create(2400);
           bool d= NetConfig.checkedTime();
          
            BaseConfig.tcpPort = "192.168.1.33:416";
            BaseConfig.Working = true;
            LoggerCommon.loggerMongon = false;
            LoggerCommon.loggerInfoLoggerFile = false;
            LoggerCommon.loggerMyConsole = true;
            Console.WriteLine("Hello, World!");
            HttpApiFacade.initTypes(3600 ,true);
         
            BaseConfig.VirtualIp = "192.168.1.60";
            NetConfig.MeIp = "192.168.1.61";
            BaseConfig.MainSiteIp = "192.168.1.61";
            BaseConfig.SlaveSiteIp = "192.168.1.62";
            // HATask t=new HATask();
            // t.arp();
       
            TCPFactray<tcp>.init();
            while (true) {
                String info = MyConsole.getOne();
                if (info != null) {
                    Console.WriteLine(info);
                }

              //  t.arp();
                Thread.Sleep(1000);
            }
         



        }

      


    }


    public class tcp : MyTcpClient
    {
        public override bool readed(byte[] b)
        {
            b[0]++;
            Console.WriteLine(Convert.ToHexString(b));
            send(b);
           
            return false;
        }
    }
}